<div class="blazorise-codeblock">
<div class="html"><pre>
<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">Button</span> <span class="htmlAttributeName">Color</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="enum">Color</span><span class="enumValue">.Primary</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>(()=&gt;snackbarPrimary.Show())</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>Primary<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">Button</span><span class="htmlTagDelimiter">&gt;</span>
<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">Button</span> <span class="htmlAttributeName">Color</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="enum">Color</span><span class="enumValue">.Secondary</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>(()=&gt;snackbarSecondary.Show())</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>Secondary<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">Button</span><span class="htmlTagDelimiter">&gt;</span>

<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">Snackbar</span> <span class="htmlAttributeName"><span class="atSign">&#64;</span>ref</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">snackbarPrimary</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Color</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="enum">SnackbarColor</span><span class="enumValue">.Primary</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>
  <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">SnackbarBody</span><span class="htmlTagDelimiter">&gt;</span>
    Single line of text directly related to the operation performed
    <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">SnackbarAction</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>(()=&gt;snackbarPrimary.Hide())</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>ACTION<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">SnackbarAction</span><span class="htmlTagDelimiter">&gt;</span>
  <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">SnackbarBody</span><span class="htmlTagDelimiter">&gt;</span>
<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">Snackbar</span><span class="htmlTagDelimiter">&gt;</span>
<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">Snackbar</span> <span class="htmlAttributeName"><span class="atSign">&#64;</span>ref</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">snackbarSecondary</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Color</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="enum">SnackbarColor</span><span class="enumValue">.Secondary</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>
  <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">SnackbarBody</span><span class="htmlTagDelimiter">&gt;</span>
    Single line of text directly related to the operation performed
    <span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">SnackbarAction</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>(()=&gt;snackbarSecondary.Hide())</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>ACTION<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">SnackbarAction</span><span class="htmlTagDelimiter">&gt;</span>
  <span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">SnackbarBody</span><span class="htmlTagDelimiter">&gt;</span>
<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">Snackbar</span><span class="htmlTagDelimiter">&gt;</span>
</pre></div>
<div class="csharp"><pre>
<span class="atSign">&#64;</span>code{
    <span class="keyword">private</span> Snackbar snackbarPrimary;
    <span class="keyword">private</span> Snackbar snackbarSecondary;
}
</pre></div>
</div>
